package com.zhentao.enums.admin;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 会员表
 * @TableName ad_membership
 */
@TableName(value ="ad_membership")
@Data
public class AdMembership implements Serializable {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 会员等级
     */
    @TableField(value = "membership_name")
    private String membershipName;

    /**
     * 会员价格
     */
    @TableField(value = "membership_price")
    private BigDecimal membershipPrice;

    /**
     * 会员持续时间（按月）
     */
    @TableField(value = "membership_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date membershipTime;

    /**
     * 会员介绍
     */
    @TableField(value = "membership_desc")
    private String membershipDesc;

    /**
     * 创建时间
     */
    @TableField(value = "created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    /**
     * 修改时间
     */
    @TableField(value = "updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;

    /**
     * 是否删除
     */
    @TableField(value = "is_deleted")
    @TableLogic(value = "1",delval = "2")
    private Integer isDeleted;

    /**
     * 状态 0上架 1下架
     */
    @TableField(value = "status")
    private Integer status;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
